package STUDENT.TranMinhVu.OOPS.ArrayExercises.BaiTapQuanLySachThuVien;

import java.util.Comparator;
import java.util.Set;

public class Sach implements Comparable<Sach>{
	public int masach;
	public String tensach;
	public String tacgia;
	public int namXuatban;
	public String chuyennganh;
	//public Set<BangQLMuonSach> muonsach;
	public int getMasach() {
		return masach;
	}
	public Sach(int masach, String tensach, String tacgia, int namXuatban, String chuyennganh) {
		super();
		this.masach = masach;
		this.tensach = tensach;
		this.tacgia = tacgia;
		this.namXuatban = namXuatban;
		this.chuyennganh = chuyennganh;
	}
	public Sach() {
		// TODO Auto-generated constructor stub
	}
	public void setMasach(int masach) {
		this.masach = masach;
	}
	public String getTensach() {
		return tensach;
	}
	public void setTensach(String tensach) {
		this.tensach = tensach;
	}
	public String getTacgia() {
		return tacgia;
	}
	public void setTacgia(String tacgia) {
		this.tacgia = tacgia;
	}
	@Override
	public String toString() {
		return "Sach [masach=" + masach + ", tensach=" + tensach + ", tacgia=" + tacgia + ", namXuatban=" + namXuatban
				+ ", chuyennganh=" + chuyennganh + "]";
	}
	public int getNamXuatban() {
		return namXuatban;
	}
	public void setNamXuatban(int namXuatban) {
		this.namXuatban = namXuatban;
	}
	public String getChuyennganh() {
		return chuyennganh;
	}
	public void setChuyennganh(String chuyennganh) {
		this.chuyennganh = chuyennganh;
	}
	public int compareTo(Sach arg0) {
		int compareMasach = ((Sach) arg0).getMasach();	
		// TODO Auto-generated method stub
		return compareMasach - this.masach;
	}
	
}
